import 'dart:typed_data';

import 'package:flutter_blue_plus/flutter_blue_plus.dart';

class BleDiscoveredDevice {
  /// The unique identifier of the device.
  /// BluetoothDevice

  final Map<String, Uint8List>? serviceData;
  final List<String>? serviceUuids;
  final Uint8List? manufacturerData;
  final int rssi;

  final BluetoothDevice device;

  String get id => device.remoteId.str;
  String get name => device.advName;
  String get platformName => device.platformName;

  String get shortId => id.length > 12 ? id.substring(0, 12) : id;

  //final Connectable connectable;

  const BleDiscoveredDevice({
    required this.device,
    this.serviceData,
    this.manufacturerData,
    required this.rssi,
    this.serviceUuids,
    //this.connectable = Connectable.unknown,
  });
}
